package com.ybwh.springboot2.conf.mvc;

import org.springframework.core.convert.converter.Converter;


/**
 * 解决 @RequestParam 去空格问题
 */
public class StringTrimConverter implements Converter<String, String> {

    @Override
    public String convert(String source) {


        if (source == null) {
            return null;
        }
        return source.trim();
    }
}